import { API } from '../config/config';

import HTTP from '../utils/http';

const SLIDER = API.SLIDER;

class SliderService extends HTTP {
  
  async getSliderData() {
    return new Promise((resolve, reject) => {
      this.axiosGet({
        url: SLIDER.GET_SLIDER_DATA,
        success: (res) => {
          resolve(res);
        },
        error: (err) => {
          alert('网络请求错误');
          window.location.reload();
        }
      })
    })
  }
 
}

export default SliderService;